<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Symbol 创建对象属性</title>
</head>
<body>
    <script>
        //向对象中添加与 up 相关的方法  
        let game = {
            name:'俄罗斯方块',
        };

        //声明一个 key
        let key = Symbol();

        //为对象添加方法
        game[key] = function(){
            console.log('变形');
        }

        //调用
        game[key]();


    </script>
</body>
</html>